
#pragma once

#include <stdbool.h>
#include <stddef.h>
#include <string.h>

struct HashTable;
struct HashTableEntry;

bool hash_table_contains(struct HashTable * ht, const char * str, size_t len);

static inline bool hash_table_contains_len(struct HashTable * ht, const char * str)
{
    return hash_table_contains(ht, str, strlen(str));
}



struct HashTableEntry * hash_table_add(struct HashTable * ht, const char * str, size_t len);

static inline struct HashTableEntry * hash_table_add_len(struct HashTable * ht, const char * str)
{
    return hash_table_add(ht, str, strlen(str));
}


struct HashTable * create_hash_table();

void free_hash_table(struct HashTable * ht);
